/*
 * DirPolozkyTab.java
 *
 * Created on 16. prosinec 2002, 17:36
 */

package cz.masa.FotoCAT;

import javax.swing.table.AbstractTableModel;

/**
 *
 * @author  Jiri Masnik
 */
public class ImgPolozkyTab extends AbstractTableModel {
    dirInternalFrame dif;

    public ImgPolozkyTab(dirInternalFrame dif) {
        this.dif = dif; 
    }
    
    public int getColumnCount() {
        return 4;
    }
    
    public int getRowCount() {
        return dif.getImgCount();
    }
    
    public String getColumnName(int col) {
        if(col == 0) return "Filename";
        if(col == 1) return "Name";
        if(col == 2) return "Resolution";
        if(col == 3) return "Film name";
        return "";
    }

    public Object getValueAt(int param, int param1) {
        fcaImage im = dif.getImageAtIndex(param);
        if(param1 == 0) return im.getFilename();
        if(param1 == 1) return im.getName();
        if(param1 == 2) return im.getResolutionStr();
        if(param1 == 3) return im.getFcaDirectory().getName();
        return "";
    }
    
}
